<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <button id="btn" type="button">按钮</button>

    <script>
        btn.addEventListener("click", function () {
            console.log("this:btn", this);   // btn
        });


        var request = new XMLHttpRequest();
        request.open("GET", "./");
        request.send();
        request.onloadend = function () {
            console.log("this:XMLHttpRequest", this)  // XMLHttpRequest
        }
    </script>

</body>

</html>